package com.ctshk.rpc.order.scenic.service.app;

import com.ctshk.common.dto.Result;
import com.ctshk.common.model.PageResponse;
import com.ctshk.common.model.TokenUser;
import com.ctshk.rpc.order.scenic.dto.*;
import com.ctshk.rpc.order.scenic.dto.app.AppScenicDTO;
import com.ctshk.rpc.order.scenic.dto.app.AppScenicOrderDTO;
import com.ctshk.rpc.order.scenic.req.*;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 景点门票订单 服务类
 * </p>
 *
 * @author 张志朋
 * @since 2021-02-24
 */
public interface IAppScenicOrderService {

    Result<AppScenicOrderDTO> findScenicOrderInfoByNumber(String number);

    List<AppScenicDTO> selectScenicNameByScenicIds(String scenicIds);

    /**
     * 填写订单页新增订单与游客信息
     *
     * @param scenicAddCheckOrderReq 填写订单页新增订单与游客信息入参
     * @return 返回值
     */
    Result addOrderInfo(ScenicAddCheckOrderReq scenicAddCheckOrderReq, Long userId);

    /**
     * 新增外挂单
     *
     * @param scenicManualOrderReq 新增外挂单入参
     * @param id 用户id
     * @return 返回值
     */
    Result addManualOrder(ScenicManualOrderReq scenicManualOrderReq, Long id, TokenUser tokenUser);

    /**
     * 积分兑换港币
     *
     * @param integral 积分
     * @return 返回值
     */
    Result<ScenicOrderIntegralExchangeDTO> conversionIntegral(Long integral);

    /**
     * 根据订单id查询订单信息
     *
     * @param orderId 订单id
     * @return 订单消息
     */
    Result<ScenicOrderPayQueryInfoDTO> queryOrderInfo(Long orderId);

    /**
     * 预订中心下单
     *
     * @param reqList 预订中心订单入参
     * @return 返回值
     */
    Result payOrder(List<ScenicPayOrderCollectionReq> reqList, Long userId);

    PageResponse<ScenicOrderDTO> list(ScenicOrderReq scenicOrderReq, TokenUser tokenUser);

    Result<ScenicOrderDetailDTO>  scenicOrderDetail(ScenicOrderDetailReq scenicOrderDetailReq);

    /**
     * 收款
     * @param scenic0rderCollectionDetailReq
     * @return
     */
    Result scenicOrderCollection(Scenic0rderCollectionDetailReq scenic0rderCollectionDetailReq,TokenUser user);

    /**
     * 待付款状态取消订单
     * @param
     * @return
     */
    Result<Long> cancelScenicOrder(Scenic0rderCancelReq scenic0rderCancelReq,TokenUser tokenUser);

    /**
     * 待确认、确认成功、确认取消状态取消订单
     * @param
     * @return
     */
    Result<Long> cancelScenicOrderRefund(Scenic0rderRefundDetailReq scenic0rderRefundDetailReq, TokenUser tokenUser);

    Result<Long> cancelApproval(ScenicOrderCheckReq scenicOrderCheckReq,TokenUser tokenUser);

    /**
     * 确认订单
     * @param
     * @return
     */
    Result<Long> confirmOrder(ScenicProductOrderReq scenicProductOrderReq,TokenUser tokenUser);

    /**
     * 通知旅客
     * @param
     * @return
     */
    Result notice(Scenic0rderNoticeReq scenic0rderNoticeReq);


    /**
     * 审批
     * @param
     * @return
     */
    Result<Long> approve(ScenicOrderApproveReq scenicOrderApproveReq,TokenUser tokenUser);

    /**
     * 最近一次查询结束时间到当前时间的数据
     */
    Result<List<MyScenicOrderDTO>> recentToNow(LocalDateTime recent, LocalDateTime now);


    Result supplierConfirmOrder(ConfirmProductTickeReq confirmReq);

    /**
     * 查询已售卖的门票数
     * @param  type 1.用户   2.代理商
     * @param productId 产品
     * @param Id 用户id 或者代理商iD
     * @return
     */
    Result<Integer> querySalaNumber(Integer type,Long productId,Long Id);



}
















